/* This test concentrates on TLS ciphersuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA. The curve used in this demo is P256.  */

#include   "nx_api.h"
#include   "nx_secure_tls_api.h"

extern VOID    test_control_return(UINT status);


#if !defined(NX_SECURE_TLS_CLIENT_DISABLED) && !defined(NX_SECURE_TLS_SERVER_DISABLED) && !defined(NX_SECURE_DISABLE_X509)
#define NUM_PACKETS                 24
#define PACKET_SIZE                 1536
#define PACKET_POOL_SIZE            (NUM_PACKETS * (PACKET_SIZE + sizeof(NX_PACKET)))
#define THREAD_STACK_SIZE           1024
#define ARP_CACHE_SIZE              1024
#define BUFFER_SIZE                 64
#define METADATA_SIZE               16000
#define CERT_BUFFER_SIZE            2048
#define SERVER_PORT                 4433

/* Define the ThreadX and NetX object control blocks...  */

static TX_THREAD                thread_0;
static TX_THREAD                thread_1;
static NX_PACKET_POOL           pool_0;
static NX_IP                    ip_0;
static UINT                     error_counter;

static NX_TCP_SOCKET            client_socket_0;
static NX_TCP_SOCKET            server_socket_0;
static NX_SECURE_TLS_SESSION    tls_client_session_0;
static NX_SECURE_TLS_SESSION    tls_server_session_0;
static NX_SECURE_X509_CERT      client_trusted_ca;
static NX_SECURE_X509_CERT      server_trusted_ca;
static NX_SECURE_X509_CERT      client_remote_cert;
static NX_SECURE_X509_CERT      server_remote_cert;
static NX_SECURE_X509_CERT      server_local_certificate;
static NX_SECURE_X509_CERT      client_local_certificate;

static ULONG                    pool_0_memory[PACKET_POOL_SIZE / sizeof(ULONG)];
static ULONG                    thread_0_stack[THREAD_STACK_SIZE / sizeof(ULONG)];
static ULONG                    thread_1_stack[THREAD_STACK_SIZE / sizeof(ULONG)];
static ULONG                    ip_0_stack[THREAD_STACK_SIZE / sizeof(ULONG)];
static ULONG                    arp_cache[ARP_CACHE_SIZE];
static UCHAR                    client_metadata[METADATA_SIZE];
static UCHAR                    server_metadata[METADATA_SIZE];
static UCHAR                    client_cert_buffer[CERT_BUFFER_SIZE];
static UCHAR                    server_cert_buffer[CERT_BUFFER_SIZE];

static UCHAR                    request_buffer[BUFFER_SIZE];
static UCHAR                    response_buffer[BUFFER_SIZE];
static UCHAR                    tls_packet_buffer[2][4000];

/*  Cryptographic routines. */
extern const NX_SECURE_TLS_CRYPTO nx_crypto_tls_ciphers;

static unsigned char CA4096_der[] = {
  0x30, 0x82, 0x05, 0x20, 0x30, 0x82, 0x03, 0x08, 0x02, 0x09, 0x00, 0x84,
  0x6a, 0x93, 0x10, 0x15, 0x3f, 0x0f, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x2a,
  0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x52,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43,
  0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02,
  0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c,
  0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a,
  0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
  0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55,
  0x04, 0x03, 0x0c, 0x06, 0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x30, 0x1e,
  0x17, 0x0d, 0x31, 0x38, 0x30, 0x37, 0x31, 0x39, 0x30, 0x33, 0x31, 0x37,
  0x30, 0x38, 0x5a, 0x17, 0x0d, 0x32, 0x32, 0x30, 0x37, 0x31, 0x38, 0x30,
  0x33, 0x31, 0x37, 0x30, 0x38, 0x5a, 0x30, 0x52, 0x31, 0x0b, 0x30, 0x09,
  0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30,
  0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b,
  0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48, 0x31,
  0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45,
  0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x06,
  0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x30, 0x82, 0x02, 0x22, 0x30, 0x0d,
  0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05,
  0x00, 0x03, 0x82, 0x02, 0x0f, 0x00, 0x30, 0x82, 0x02, 0x0a, 0x02, 0x82,
  0x02, 0x01, 0x00, 0xc0, 0xdc, 0x85, 0xe3, 0x5d, 0x34, 0x5d, 0x02, 0xea,
  0x09, 0x25, 0xca, 0x6b, 0xef, 0xe1, 0x77, 0x40, 0x0e, 0x00, 0x38, 0x0a,
  0x19, 0xa0, 0x61, 0x6b, 0x27, 0x5c, 0xcd, 0xd1, 0xb0, 0xee, 0x3b, 0x2e,
  0x45, 0x0a, 0x5a, 0x2b, 0x71, 0x80, 0xf0, 0xe0, 0x1c, 0xdf, 0xee, 0x9f,
  0x15, 0x02, 0x25, 0x6f, 0x7e, 0x56, 0x3a, 0x02, 0x5a, 0xc0, 0xcb, 0x40,
  0x4b, 0xc1, 0x8b, 0xb1, 0x6e, 0xc7, 0xd3, 0x24, 0x89, 0xb5, 0xd1, 0x48,
  0xb6, 0x09, 0xaf, 0xcc, 0xf9, 0x2f, 0x06, 0x97, 0x3d, 0x6a, 0xb0, 0x10,
  0x07, 0x89, 0x3b, 0xcb, 0x16, 0x38, 0xe5, 0x84, 0xc5, 0x74, 0xac, 0xf8,
  0x49, 0x31, 0x10, 0xc0, 0x44, 0x87, 0xc7, 0x4a, 0x3f, 0x15, 0xdb, 0x09,
  0xaa, 0x68, 0x64, 0x8c, 0x97, 0x81, 0x3a, 0x51, 0x29, 0xa7, 0xbc, 0x4e,
  0x41, 0x8a, 0x96, 0xf7, 0x08, 0x3d, 0x84, 0x0a, 0x8d, 0x8b, 0x1d, 0xf2,
  0xcd, 0x8d, 0x81, 0x56, 0x18, 0x4d, 0x65, 0x41, 0x99, 0x04, 0xb6, 0xee,
  0x3c, 0xae, 0x56, 0xc9, 0x0e, 0x51, 0x22, 0xb3, 0xd6, 0xce, 0xba, 0x83,
  0x91, 0x50, 0xaa, 0xf4, 0xe7, 0x64, 0x47, 0xe1, 0xfe, 0x20, 0x74, 0x27,
  0xfe, 0x0a, 0x79, 0x5c, 0x0e, 0xba, 0x76, 0x01, 0xf0, 0x2e, 0x49, 0x2e,
  0x6c, 0x8a, 0xcb, 0xd0, 0x3d, 0xdc, 0x7e, 0x61, 0xc6, 0x19, 0x48, 0xca,
  0x73, 0xca, 0x2c, 0x4c, 0xe0, 0x7f, 0x50, 0x49, 0x05, 0xfc, 0xa3, 0x2c,
  0x8f, 0x7a, 0x0f, 0x1d, 0x0c, 0xdd, 0x85, 0x98, 0x9e, 0x58, 0xc4, 0xd7,
  0x71, 0x61, 0xb8, 0xf6, 0x6d, 0x06, 0xe2, 0x70, 0x15, 0x64, 0x81, 0x17,
  0x30, 0xb9, 0x91, 0x08, 0x77, 0x95, 0xc1, 0x23, 0x80, 0xaa, 0xd2, 0xf8,
  0xe1, 0x06, 0x2a, 0x71, 0x21, 0x11, 0x69, 0x92, 0x89, 0x54, 0x79, 0x9a,
  0xdb, 0x63, 0x45, 0x62, 0x91, 0xb5, 0xc9, 0x2a, 0x6e, 0xd6, 0x10, 0x58,
  0xed, 0x09, 0x41, 0xba, 0x29, 0xcc, 0xe8, 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9c, 0xaf,
  0xe7, 0xc1, 0x61, 0x96, 0x0b, 0xbe, 0xf2, 0x83, 0x98, 0x50, 0x65, 0xd7,
  0x9a, 0x2c, 0x09, 0x6e, 0xd9, 0x8e, 0x03, 0x9c, 0xc5, 0x5c, 0x0e, 0xbb,
  0xe6, 0xfa, 0x94, 0x04, 0x3e, 0x2e, 0xca, 0x06, 0x08, 0x4e, 0xdc, 0xec,
  0xa8, 0xc9, 0x54, 0x79, 0xf3, 0xf3, 0xa2, 0x71, 0xd8, 0xf3, 0xf4, 0xb1,
  0xd4, 0x82, 0xbd, 0x65, 0xf2, 0x34, 0x68, 0x37
};
static unsigned int CA4096_der_len = 1316;

static unsigned char test_server_4096_der[] = {
  0x30, 0x82, 0x05, 0xe3, 0x30, 0x82, 0x03, 0xcb, 0xa0, 0x03, 0x02, 0x01,
  0x02, 0x02, 0x01, 0x0d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
  0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30,
  0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b,
  0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31,
  0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45,
  0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02,
  0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,
  0x06, 0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x30, 0x1e, 0x17, 0x0d, 0x31,
  0x38, 0x30, 0x37, 0x31, 0x39, 0x30, 0x33, 0x32, 0x34, 0x30, 0x31, 0x5a,
  0x17, 0x0d, 0x31, 0x39, 0x30, 0x37, 0x31, 0x39, 0x30, 0x33, 0x32, 0x34,
  0x30, 0x31, 0x5a, 0x30, 0x4f, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
  0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
  0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
  0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09,
  0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x19, 0x30,
  0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x10, 0x74, 0x65, 0x73, 0x74,
  0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2d, 0x34, 0x30, 0x39, 0x36,
  0x30, 0x82, 0x02, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
  0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00,
  0x30, 0x82, 0x02, 0x0a, 0x02, 0x82, 0x02, 0x01, 0x00, 0xb8, 0xeb, 0x9a,
  0x7c, 0x30, 0x6b, 0xcb, 0xf1, 0xaa, 0xc0, 0xc6, 0x2b, 0x95, 0xb7, 0xf9,
  0x52, 0x04, 0x7d, 0x13, 0xe9, 0x46, 0x46, 0xaf, 0x50, 0x6f, 0x4d, 0xe0,
  0x9e, 0x9f, 0xd9, 0x49, 0xef, 0x79, 0x32, 0x95, 0x2d, 0x9a, 0x2b, 0x96,
  0x9b, 0x7d, 0x26, 0x74, 0xa5, 0xd9, 0xed, 0xf2, 0xb7, 0x6f, 0x02, 0x8f,
  0xd9, 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0x61, 0xa8, 0x91, 0x24, 0xe0, 0x1c, 0x22,
  0xbf, 0xcb, 0x21, 0xa3, 0xf1, 0xa7, 0xa1, 0x6d, 0xe6, 0xa8, 0xc0, 0x42,
  0x5a, 0x45, 0xbe, 0x39, 0xa2, 0x74, 0xe7, 0xb3, 0x75, 0x07, 0x6f, 0x70,
  0x1e, 0x48, 0x18, 0xe6, 0x56, 0xb7, 0xde, 0xfd, 0x80, 0xf4, 0x33, 0xea,
  0x5f, 0x0e, 0x37, 0x82, 0x1d, 0x37, 0x3b, 0x70, 0x76, 0xa0, 0x0e, 0x4a,
  0xe8, 0xf6, 0xb3, 0xf4, 0x3a, 0xfd, 0xff, 0x83, 0x8b, 0xcf, 0x6a, 0x3b,
  0xf3, 0xd7, 0xb9, 0x66, 0x4a, 0x24, 0x88, 0xb6, 0x79, 0x37, 0xe5, 0x63,
  0x30, 0xf5, 0x3d, 0xd4, 0x92, 0x98, 0xab, 0xe3, 0x7a, 0xad, 0x4c, 0xc8,
  0x20, 0xe1, 0x33, 0xa9, 0x53, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81,
  0xc6, 0x30, 0x81, 0xc3, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04,
  0x65, 0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30,
  0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b,
  0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31,
  0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45,
  0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02,
  0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,
  0x06, 0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x82, 0x09, 0x00, 0x84, 0x6a,
  0x93, 0x10, 0x15, 0x3f, 0x0f, 0x0f, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d,
  0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f,
  0x04, 0x04, 0x03, 0x02, 0x03, 0xf8, 0x30, 0x3b, 0x06, 0x03, 0x55, 0x1d,
  0x25, 0x04, 0x34, 0x30, 0x32, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
  0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03,
  0x02, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, 0x06,
  0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x04, 0x06, 0x08, 0x2b,
  0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x2a,
  0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82,
  0x02, 0x01, 0x00, 0xb0, 0x14, 0x8d, 0xda, 0x29, 0x39, 0x70, 0x87, 0x09,
  0xa3, 0xf7, 0x11, 0xfe, 0x96, 0x58, 0x9f, 0x53, 0xa2, 0x0e, 0x26, 0xf8,
  0x15, 0x0b, 0xa5, 0xcb, 0xa3, 0x46, 0x12, 0x75, 0x22, 0xa8, 0xf0, 0x11,
  0x2b, 0x95, 0xe5, 0x1f, 0xbd, 0xc9, 0x6e, 0xfc, 0x95, 0x7e, 0x2a, 0x35,
  0x84, 0x0d, 0xea, 0xae, 0x3e, 0xff, 0x0b, 0xec, 0xda, 0xa7, 0x6a, 0x37,
  0x3f, 0x68, 0xad, 0xb3, 0xce, 0x02, 0x88, 0xfb, 0x0c, 0x05, 0x3e, 0x8b,
  0x14, 0x4b, 0xc2, 0xec, 0x1b, 0x45, 0xfc, 0xed, 0xf4, 0x23, 0x17, 0x78,
  0x46, 0xf1, 0xba, 0x79, 0x09, 0x04, 0xc9, 0xae, 0x18, 0x1d, 0xbd, 0x17,
  0x36, 0x2b, 0x01, 0x88, 0x74, 0x45, 0xc2, 0xa2, 0x67, 0x91, 0xea, 0xd6,
  0x5a, 0xc8, 0x4c, 0x86, 0xb4, 0x2e, 0x9f, 0x62, 0x05, 0xb9, 0xca, 0x7f,
  0xf8, 0x13, 0x0f, 0xb6, 0x80, 0xc3, 0x80, 0x7b, 0x93, 0xdc, 0x31, 0xd8,
  0xa3, 0xc0, 0xce, 0x98, 0xf2, 0xea, 0x89, 0x11, 0xbd, 0xfe, 0x4c, 0x2f,
  0xf3, 0x16, 0xa6, 0x05, 0xd0, 0xe0, 0x14, 0x88, 0xb5, 0x53, 0xf3, 0x06,
  0xab, 0xc5, 0x89, 0xbd, 0xd5, 0x02, 0x4c, 0x62, 0xbe, 0xa4, 0xf6, 0xa4,
  0x46, 0x01, 0xac, 0xb2, 0xe7, 0x3d, 0xcd, 0xd0, 0xf5, 0x53, 0xf3, 0x45,
  0x3b, 0xb8, 0x2c, 0x3a, 0x72, 0x2f, 0x2e, 0xcf, 0x60, 0x99, 0x1f, 0xd1,
  0x22, 0x0c, 0x39, 0xdc, 0x90, 0xff, 0x90, 0xb2, 0x5c, 0x3f, 0xbb, 0xd0,
  0xde, 0x17, 0x5d, 0xde, 0x71, 0xc0, 0x73, 0xd9, 0xeb, 0x3d, 0xd4, 0x42,
  0x03, 0x73, 0x9d, 0x71, 0x7a, 0x92, 0x6a, 0x60, 0xee, 0x24, 0xfd, 0x08,
  0xb8, 0xbe, 0x7e, 0x96, 0x95, 0xfb, 0x12, 0x9d, 0xb8, 0x19, 0x82, 0xa3,
  0x34, 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0x26, 0x9a, 0x0c, 0xf8, 0x25, 0x75, 0x04, 0x37, 0xe0, 0x4f,
  0xf0, 0x76, 0xa4, 0x9e, 0x62, 0x9a, 0xe4, 0x0a, 0xf0, 0xbb, 0x85, 0x73,
  0x15, 0x59, 0x37, 0x1c, 0x6b, 0xf8, 0xa3, 0xec, 0xe1, 0x01, 0x3f, 0xeb,
  0xed, 0xe7, 0x33, 0xf9, 0xfc, 0x69, 0x8a, 0x18, 0xec, 0x4f, 0xb0, 0xf1,
  0x0d, 0x1d, 0x55, 0x8e, 0x3f, 0x0c, 0x12, 0xaa, 0x3f, 0xdd, 0xa1, 0x88,
  0xe4, 0x07, 0x36, 0xe0, 0x4d, 0x3d, 0x15, 0x6b, 0xc5, 0x52, 0xfa, 0x17,
  0x71, 0x5e, 0xef, 0x8e, 0x9a, 0x86, 0xa6, 0xa0, 0xeb, 0x9f, 0xc9, 0x30,
  0x78, 0x3b, 0xde, 0x9a, 0x90, 0x00, 0x70, 0x79, 0x83, 0x38, 0x49
};
static unsigned int test_server_4096_der_len = 1511;

static unsigned char test_server_4096_key_der[] = {
  0x30, 0x82, 0x09, 0x28, 0x02, 0x01, 0x00, 0x02, 0x82, 0x02, 0x01, 0x00,
  0xb8, 0xeb, 0x9a, 0x7c, 0x30, 0x6b, 0xcb, 0xf1, 0xaa, 0xc0, 0xc6, 0x2b,
  0x95, 0xb7, 0xf9, 0x52, 0x04, 0x7d, 0x13, 0xe9, 0x46, 0x46, 0xaf, 0x50,
  0x6f, 0x4d, 0xe0, 0x9e, 0x9f, 0xd9, 0x49, 0xef, 0x79, 0x32, 0x95, 0x2d,
  0x9a, 0x2b, 0x96, 0x9b, 0x7d, 0x26, 0x74, 0xa5, 0xd9, 0xed, 0xf2, 0xb7,
  0x6f, 0x02, 0x8f, 0xd9, 0x0a, 0x9e, 0x5e, 0xfb, 0x75, 0x37, 0xf6, 0xbe,
  0xca, 0x08, 0x42, 0x6b, 0x21, 0xe0, 0x63, 0xa1, 0x97, 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 0x49, 0x11, 0x36, 0xed, 0x5c, 0xde, 0xb6, 0xec, 0xbb,
  0x02, 0x82, 0x01, 0x00, 0x1f, 0xee, 0x50, 0xcc, 0x65, 0xfa, 0x34, 0x46,
  0x15, 0x25, 0x74, 0xe1, 0x64, 0xde, 0xa2, 0xb2, 0x59, 0xde, 0xca, 0xbb,
  0xf0, 0x93, 0x06, 0xb1, 0x7e, 0x3c, 0xc2, 0x49, 0x76, 0x15, 0xdb, 0x48,
  0x93, 0x9e, 0x58, 0xe0, 0x98, 0xe8, 0x2b, 0x80, 0x0f, 0x18, 0xd2, 0x00,
  0x76, 0x43, 0x46, 0x26, 0xec, 0x4b, 0x40, 0xea, 0xaf, 0x46, 0x3a, 0x7d,
  0x36, 0xbc, 0xff, 0x42, 0x4d, 0x00, 0x80, 0x06, 0xf2, 0xe6, 0x83, 0x02,
  0x42, 0xc5, 0xc2, 0x0a, 0x4f, 0x46, 0x61, 0x59, 0x1a, 0x28, 0xf2, 0x02,
  0xa2, 0x5b, 0x5e, 0x4d, 0x5b, 0x2c, 0xa9, 0xbd, 0x12, 0x15, 0xdf, 0xd3,
  0xbf, 0x85, 0xa7, 0x51, 0xe4, 0x34, 0xfd, 0xab, 0x1f, 0x5d, 0xd6, 0x05,
  0xec, 0x9e, 0x05, 0xeb, 0x4a, 0xbd, 0x3b, 0x55, 0x18, 0xe2, 0x6d, 0x78,
  0x3c, 0xe3, 0x74, 0xe4, 0x0e, 0xcd, 0xbe, 0xdd, 0x64, 0x40, 0xa1, 0x65,
  0x0a, 0xf8, 0xaf, 0x74, 0x1d, 0x5b, 0xb6, 0xc6, 0x7a, 0x3e, 0xad, 0x39,
  0x64, 0xba, 0xde, 0x3a, 0xa6, 0xc5, 0xb7, 0xa9, 0xa4, 0x2e, 0xce, 0x27,
  0x5a, 0x26, 0x08, 0x5c, 0x1c, 0xc6, 0x2c, 0x25, 0xf6, 0x71, 0x21, 0xd5,
  0x93, 0x0c, 0xe9, 0xd1, 0x33, 0xb8, 0xe4, 0x7d, 0xd0, 0xfd, 0x77, 0xd5,
  0xb5, 0xa4, 0x5c, 0x9d, 0xb7, 0xe6, 0x81, 0x85, 0xa6, 0x02, 0xf5, 0xb0,
  0x38, 0xc5, 0x32, 0x69, 0xf5, 0x12, 0x99, 0x37, 0xa6, 0x98, 0x43, 0xfe,
  0xf1, 0xfb, 0x0d, 0x1b, 0x21, 0x00, 0x69, 0xc9, 0x05, 0x65, 0x79, 0xb3,
  0xc3, 0x41, 0x2b, 0x53, 0x36, 0xc4, 0x0d, 0x04, 0x7f, 0x36, 0x82, 0x6e,
  0x45, 0xd7, 0x32, 0x58, 0x62, 0xfd, 0x9c, 0x01, 0x8e, 0x32, 0xbe, 0x18,
  0xf6, 0x59, 0x04, 0x7d, 0x32, 0x06, 0x13, 0xb4, 0x06, 0x8e, 0x6d, 0xe9,
  0x5b, 0xdd, 0x68, 0x0f, 0x46, 0xe5, 0x4b, 0x13
};
static unsigned int test_server_4096_key_der_len = 2348;

static unsigned char test_client_4096_der[] = {
  0x30, 0x82, 0x05, 0xe3, 0x30, 0x82, 0x03, 0xcb, 0xa0, 0x03, 0x02, 0x01,
  0x02, 0x02, 0x01, 0x0e, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
  0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x52, 0x31, 0x0b, 0x30,
  0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b,
  0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31,
  0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45,
  0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02,
  0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,
  0x06, 0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x30, 0x1e, 0x17, 0x0d, 0x31,
  0x38, 0x30, 0x37, 0x31, 0x39, 0x30, 0x33, 0x32, 0x35, 0x34, 0x33, 0x5a,
  0x17, 0x0d, 0x31, 0x39, 0x30, 0x37, 0x31, 0x39, 0x30, 0x33, 0x32, 0x35,
  0x34, 0x33, 0x5a, 0x30, 0x4f, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
  0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
  0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31, 0x0b, 0x30, 0x09, 0x06,
  0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x0b, 0x30, 0x09,
  0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02, 0x45, 0x4c, 0x31, 0x19, 0x30,
  0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x10, 0x74, 0x65, 0x73, 0x74,
  0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x34, 0x30, 0x39, 0x36,
  0x30, 0x82, 0x02, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
  0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00,
  0x30, 0x82, 0x02, 0x0a, 0x02, 0x82, 0x02, 0x01, 0x00, 0xce, 0x81, 0xc6,
  0xb7, 0xac, 0x9d, 0x77, 0x93, 0xae, 0x21, 0x21, 0x76, 0xa3, 0x6d, 0xc1,
  0x3b, 0x28, 0x54, 0x16, 0x45, 0xf4, 0x66, 0x92, 0x40, 0xab, 0x7f, 0x07,
  0x37, 0xfe, 0x2c, 0xa1, 0xc3, 0x29, 0x89, 0xee, 0x13, 0xc7, 0x7d, 0xaf,
  0xa7, 0xb3, 0x4f, 0x19, 0x70, 0xdb, 0x23, 0x39, 0x29, 0xd2, 0x04, 0x95,
  0x15, 0x44, 0xfc, 0x20, 0xb6, 0x77, 0xe9, 0x1a, 0xea, 0x78, 0x88, 0x5a,
  0x0a, 0xd4, 0x49, 0x83, 0xee, 0x85, 0x4a, 0x28, 0x36, 0x37, 0x29, 0x90,
  0x5a, 0xba, 0x77, 0x92, 0xaa, 0xfe, 0xf3, 0xbd, 0x6c, 0xd2, 0x6e, 0x3b,
  0xac, 0x12, 0x03, 0x9a, 0xa7, 0x1f, 0xee, 0x01, 0xc5, 0x0e, 0x90, 0x43,
  0xec, 0xe4, 0x40, 0xd1, 0xbf, 0xf7, 0x06, 0x98, 0xe3, 0x0c, 0xc8, 0xd7,
  0xca, 0x13, 0x1b, 0x38, 0xc3, 0x15, 0x93, 0x0c, 0xf7, 0x3e, 0xe4, 0xe6,
  0xcd, 0x53, 0x07, 0x56, 0x9d, 0xd0, 0xb1, 0x24, 0x0a, 0xb6, 0x2e, 0xe3,
  0x73, 0xd5, 0xf6, 0xe4, 0x1c, 0x3c, 0x46, 0xf8, 0x82, 0x63, 0x53, 0x71,
  0x90, 0xe6, 0x4a, 0xcf, 0x88, 0xd4, 0xa5, 0xa4, 0xba, 0x6d, 0x9b, 0x33,
  0x30, 0xd1, 0x10, 0x46, 0xa9, 0xf2, 0xbc, 0xda, 0x11, 0x42, 0x9b, 0x16,
  0xe7, 0x6b, 0xdb, 0x39, 0xeb, 0x26, 0xa4, 0x99, 0xed, 0x69, 0xf1, 0xb4,
  0x29, 0xe1, 0x62, 0xcb, 0xd0, 0x01, 0x91, 0xdf, 0x6e, 0x15, 0x43, 0x63,
  0x34, 0xff, 0x81, 0x35, 0xc4, 0xbb, 0x58, 0x4c, 0x7a, 0x90, 0x6f, 0xfd,
  0x04, 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6, 0x8b, 0x60, 0x81, 0x89, 0xaf, 0xb8, 0x9f, 0xf6, 0x37, 0x7c,
  0xdb, 0xdd, 0x2b, 0x47, 0xbd, 0x2e, 0x4a, 0x26, 0x5e, 0x9a, 0x4b, 0x12,
  0x4d, 0x0f, 0x04, 0x6b, 0x0d, 0x92, 0x5b, 0x54, 0x5d, 0xf1, 0x14, 0x50,
  0xa4, 0x21, 0x8f, 0x79, 0x7d, 0xbc, 0x8f, 0x35, 0x42, 0xec, 0x0c, 0x67,
  0xc2, 0xa0, 0xdc, 0xc4, 0x95, 0x8d, 0x85, 0x6b, 0xf2, 0x87, 0xb1, 0xf1,
  0x93, 0xf7, 0x3d, 0x82, 0x3f, 0xc1, 0x05, 0x03, 0x04, 0xaf, 0xb0, 0x79,
  0x8d, 0x21, 0xeb, 0x26, 0x06, 0xea, 0xdb, 0xd1, 0xb5, 0xcf, 0x62, 0x02,
  0x81, 0x97, 0xb0, 0x14, 0xce, 0xd0, 0xfb, 0xff, 0x53, 0x22, 0xa4, 0xba,
  0xd4, 0x81, 0xdb, 0xab, 0x65, 0x38, 0xce, 0x9d, 0x17, 0x97, 0x69, 0xe7,
  0x86, 0xb5, 0xa1, 0x07, 0x62, 0x3a, 0xb1, 0x77, 0x2c, 0x1c, 0xf2, 0x92,
  0x60, 0x07, 0x06, 0xab, 0x3b, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81,
  0xc6, 0x30, 0x81, 0xc3, 0x30, 0x6c, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04,
  0x65, 0x30, 0x63, 0xa1, 0x56, 0xa4, 0x54, 0x30, 0x52, 0x31, 0x0b, 0x30,
  0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4e, 0x31, 0x0b,
  0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x53, 0x48, 0x31,
  0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x02, 0x53, 0x48,
  0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x02, 0x45,
  0x4c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x02,
  0x45, 0x4c, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,
  0x06, 0x43, 0x41, 0x34, 0x30, 0x39, 0x36, 0x82, 0x09, 0x00, 0x84, 0x6a,
  0x93, 0x10, 0x15, 0x3f, 0x0f, 0x0f, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d,
  0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f,
  0x04, 0x04, 0x03, 0x02, 0x03, 0xf8, 0x30, 0x3b, 0x06, 0x03, 0x55, 0x1d,
  0x25, 0x04, 0x34, 0x30, 0x32, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
  0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03,
  0x02, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, 0x06,
  0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x04, 0x06, 0x08, 0x2b,
  0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x2a,
  0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82,
  0x02, 0x01, 0x00, 0x76, 0x77, 0x14, 0xac, 0xee, 0x21, 0xe2, 0x48, 0xab,
  0xd0, 0x36, 0x5a, 0x93, 0x47, 0x33, 0x69, 0xe3, 0xcc, 0x2c, 0x3e, 0x7e,
  0xc9, 0xca, 0xff, 0x17, 0xe6, 0xa8, 0xd2, 0x61, 0x97, 0x65, 0xf2, 0xe3,
  0x55, 0x27, 0x83, 0x80, 0xf2, 0xad, 0x52, 0x1d, 0x17, 0xcd, 0x9a, 0xf1,
  0x66, 0x7c, 0xf4, 0xe9, 0x02, 0x93, 0x56, 0x33, 0x12, 0x03, 0xe7, 0x99,
  0xb5, 0x8f, 0x2c, 0xfc, 0x6e, 0x85, 0x56, 0x33, 0xf0, 0x05, 0xdc, 0xd3,
  0xd0, 0x3f, 0xc9, 0xc5, 0x30, 0x3c, 0xd2, 0x46, 0x37, 0x8f, 0xf0, 0x87,
  0x94, 0x6a, 0xe4, 0x0a, 0x22, 0x66, 0x69, 0x94, 0x1d, 0x9f, 0xc4, 0x4d,
  0x4c, 0x26, 0xe3, 0x2f, 0x27, 0x5a, 0x3c, 0xe8, 0xee, 0x2e, 0xae, 0x3c,
  0xbe, 0x79, 0xd6, 0x17, 0x54, 0x43, 0xef, 0x2a, 0x97, 0xdc, 0x0f, 0x5b,
  0xae, 0xf6, 0xdb, 0xd5, 0x5d, 0x6f, 0x76, 0xf1, 0x54, 0x3f, 0xf7, 0x34,
  0xfd, 0x22, 0x41, 0x75, 0x37, 0xd3, 0x54, 0x7f, 0x04, 0x3d, 0x01, 0x53,
  0x44, 0x67, 0xbf, 0xe7, 0xd2, 0x7e, 0x26, 0x2b, 0x29, 0x20, 0x4c, 0xee,
  0x61, 0x25, 0x27, 0x99, 0x18, 0x61, 0x58, 0x3f, 0x02, 0x37, 0xcf, 0xba,
  0x7f, 0x81, 0x0a, 0xd0, 0x75, 0xa3, 0x97, 0xd4, 0x32, 0xf0, 0xb8, 0xab,
  0xff, 0x72, 0x50, 0x89, 0xe5, 0x0c, 0x7c, 0x24, 0xbf, 0xfb, 0x8f, 0x0d,
  0xb5, 0x35, 0x5c, 0x2c, 0x67, 0xd5, 0x8e, 0x08, 0x82, 0xcb, 0xad, 0x00,
  0x30, 0x07, 0x23, 0x2f, 0x03, 0xcd, 0xce, 0x24, 0x07, 0xf6, 0x7f, 0x15,
  0xb1, 0x82, 0x9e, 0xd3, 0xf2, 0x9a, 0x92, 0x37, 0x89, 0x5f, 0x78, 0x59,
  0x10, 0xb3, 0xe5, 0x14, 0xfc, 0xc7, 0xc8, 0xef, 0x49, 0x80, 0x08, 0x7c,
  0xbf, 0x43, 0xf6, 0x3f, 0x37, 0xca, 0x70, 0x90, 0xf6, 0x20, 0x8f, 0x1e,
  0xfc, 0x22, 0x6b, 0x1d, 0xa8, 0xa0, 0xa2, 0x08, 0x81, 0xe6, 0x47, 0x1d,
  0xf4, 0x79, 0xe5, 0x53, 0xf4, 0x37, 0x70, 0x84, 0x81, 0xbe, 0x8c, 0xe1,
  0xdf, 0x00, 0x98, 0x2e, 0x5a, 0x71, 0x58, 0x90, 0xce, 0xeb, 0x0c, 0x25,
  0x64, 0x67, 0xc7, 0x4e, 0xde, 0xa6, 0xdc, 0xac, 0xba, 0xcb, 0x66, 0x70,
  0x86, 0x17, 0xe2, 0xe7, 0xd4, 0x62, 0x7a, 0xb7, 0x45, 0xc8, 0x72, 0x4c,
  0xb3, 0xaf, 0xd8, 0x54, 0x74, 0x45, 0x09, 0x74, 0x13, 0xa8, 0x23, 0x16,
  0xf9, 0xa6, 0x93, 0x8d, 0xc6, 0xc1, 0xe1, 0x5f, 0xf6, 0xc6, 0x15, 0xf6,
  0x79, 0x3c, 0xe5, 0xf1, 0x16, 0x09, 0x84, 0x29, 0xfb, 0x82, 0x29, 0x8b,
  0xd1, 0xce, 0x50, 0xc2, 0x6e, 0x3f, 0xcb, 0x0b, 0x90, 0xf5, 0x5b, 0xad,
  0x36, 0x74, 0x4e, 0x97, 0x89, 0xe6, 0x4f, 0xf2, 0x55, 0x30, 0x2e, 0x96,
  0x04, 0x71, 0xfd, 0x49, 0x20, 0x1d, 0x70, 0x89, 0xec, 0x11, 0xbb, 0x4e,
  0x7b, 0x79, 0xc0, 0x41, 0xfa, 0x87, 0x2d, 0x59, 0xd7, 0x63, 0xfa, 0x18,
  0x7d, 0x75, 0x30, 0xd8, 0x65, 0x65, 0xe1, 0xdc, 0xcc, 0xbe, 0xe4, 0xa9,
  0x00, 0x02, 0x39, 0x90, 0x64, 0x39, 0x64, 0x1d, 0x8c, 0xfc, 0x7d, 0x5b,
  0x7f, 0x53, 0x9b, 0xfc, 0x51, 0xd4, 0x12, 0x13, 0x71, 0x27, 0xe6, 0x86,
  0x35, 0x3e, 0x2c, 0x4d, 0x06, 0x30, 0xc8, 0x0e, 0x77, 0xad, 0x49, 0x82,
  0x79, 0x90, 0x85, 0x08, 0xe6, 0x94, 0xd0, 0x1a, 0xba, 0x8f, 0xdb, 0x75,
  0x2d, 0xfe, 0x6e, 0xbf, 0x0c, 0x0f, 0x1d, 0xd4, 0x0f, 0x3b, 0x00, 0x7e,
  0x5b, 0x06, 0x20, 0x94, 0x31, 0x4f, 0x53, 0x21, 0x0a, 0x55, 0x57, 0xa1,
  0xd3, 0xf2, 0x59, 0x8f, 0xdf, 0x4f, 0xbd, 0x0c, 0x54, 0x05, 0x38, 0xe3,
  0xa2, 0x96, 0x86, 0x67, 0xe0, 0xc3, 0xcb, 0xfc, 0xf7, 0xa4, 0xe8, 0xb7,
  0x64, 0x15, 0x84, 0x4d, 0xa8, 0x32, 0x2e, 0x84, 0xb2, 0xfe, 0xd1
};
static unsigned int test_client_4096_der_len = 1511;

static unsigned char test_client_4096_key_der[] = {
  0x30, 0x82, 0x09, 0x29, 0x02, 0x01, 0x00, 0x02, 0x82, 0x02, 0x01, 0x00,
  0xce, 0x81, 0xc6, 0xb7, 0xac, 0x9d, 0x77, 0x93, 0xae, 0x21, 0x21, 0x76,
  0xa3, 0x6d, 0xc1, 0x3b, 0x28, 0x54, 0x16, 0x45, 0xf4, 0x66, 0x92, 0x40,
  0xab, 0x7f, 0x07, 0x37, 0xfe, 0x2c, 0xa1, 0xc3, 0x29, 0x89, 0xee, 0x13,
  0xc7, 0x7d, 0xaf, 0xa7, 0xb3, 0x4f, 0x19, 0x70, 0xdb, 0x23, 0x39, 0x29,
  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, 0x4d, 0x0f, 0x04, 0x6b, 0x0d, 0x92, 0x5b, 0x54, 0x5d,
  0xf1, 0x14, 0x50, 0xa4, 0x21, 0x8f, 0x79, 0x7d, 0xbc, 0x8f, 0x35, 0x42,
  0xec, 0x0c, 0x67, 0xc2, 0xa0, 0xdc, 0xc4, 0x95, 0x8d, 0x85, 0x6b, 0xf2,
  0x87, 0xb1, 0xf1, 0x93, 0xf7, 0x3d, 0x82, 0x3f, 0xc1, 0x05, 0x03, 0x04,
  0xaf, 0xb0, 0x79, 0x8d, 0x21, 0xeb, 0x26, 0x06, 0xea, 0xdb, 0xd1, 0xb5,
  0xcf, 0x62, 0x02, 0x81, 0x97, 0xb0, 0x14, 0xce, 0xd0, 0xfb, 0xff, 0x53,
  0x22, 0xa4, 0xba, 0xd4, 0x81, 0xdb, 0xab, 0x65, 0x38, 0xce, 0x9d, 0x17,
  0x97, 0x69, 0xe7, 0x86, 0xb5, 0xa1, 0x07, 0x62, 0x3a, 0xb1, 0x77, 0x2c,
  0x1c, 0xf2, 0x92, 0x60, 0x07, 0x06, 0xab, 0x3b, 0x02, 0x03, 0x01, 0x00,
  0x01, 0x02, 0x82, 0x02, 0x01, 0x00, 0xa4, 0x0f, 0x52, 0x32, 0x65, 0xfe,
  0x8c, 0x1b, 0x55, 0x81, 0x98, 0xb6, 0x4a, 0x4c, 0x4d, 0xf1, 0x93, 0xae,
  0x8a, 0x2b, 0x75, 0x69, 0x6f, 0xd3, 0xd4, 0xeb, 0x8c, 0x6e, 0x9d, 0x8e,
  0x13, 0xcd, 0x9a, 0xd8, 0xab, 0xbe, 0x27, 0x04, 0xe1, 0x62, 0x58, 0x00,
  0x05, 0x74, 0x35, 0x84, 0x9c, 0x4b, 0x6f, 0x40, 0x98, 0xb8, 0x57, 0x1f,
  0xff, 0x55, 0x37, 0x9a, 0x87, 0xf9, 0xb3, 0x5c, 0x90, 0x3c, 0x7e, 0x3f,
  0x11, 0x83, 0x93, 0x7d, 0x40, 0xc9, 0x21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 0x3c,
  0xcd, 0x7b, 0xfb, 0x8b, 0xca, 0x8a, 0x14, 0xfa, 0x25, 0xb2, 0x9b, 0x70,
  0x65, 0xe5, 0x41, 0x09, 0x63, 0xf8, 0xf4, 0xdc, 0x4b, 0x2a, 0x83, 0x4d,
  0x2f, 0x4b, 0x88, 0x05, 0xd3, 0x20, 0x55, 0x09, 0x61, 0x3b, 0x28, 0x49,
  0xcd, 0x58, 0xe4, 0x97, 0xb8, 0x55, 0x9d, 0x4a, 0xad, 0x9e, 0xb4, 0x4a,
  0xc8, 0x2e, 0xa9, 0x09, 0x9f, 0xa8, 0xf2, 0x42, 0x19, 0x51, 0xab, 0x85,
  0x9b, 0x18, 0x34, 0xf7, 0x43, 0x44, 0x10, 0x19, 0xa3, 0xc9, 0x95, 0x63,
  0x5c, 0x7f, 0x69, 0xe2, 0x38, 0x4a, 0x03, 0xa2, 0x00, 0xed, 0xca, 0x0a,
  0x88, 0xfc, 0xf5, 0xed, 0xf2, 0xfe, 0xaf, 0x12, 0xab, 0xd5, 0xe9, 0x69,
  0x34, 0x00, 0xdc, 0x6e, 0xa8, 0x44, 0xbe, 0x22, 0x13, 0x1a, 0x7b, 0x02,
  0x26, 0x9c, 0xf6, 0x44, 0x81, 0x8f, 0xd5, 0x27, 0x10, 0xd6, 0x39, 0xf5,
  0x34, 0xee, 0xf6, 0x32, 0x77, 0x4d, 0x60, 0x33, 0xd9, 0x2f, 0x7d, 0x9f,
  0x59, 0xf1, 0x01, 0xed, 0x80, 0xda, 0x16, 0x35, 0x53, 0xc0, 0x0d, 0xaa,
  0x46, 0xee, 0xcc, 0xdc, 0x7c, 0x4d, 0x90, 0x18, 0x95, 0x43, 0xd3, 0x02,
  0x82, 0x01, 0x01, 0x00, 0xd4, 0xbe, 0x2b, 0xdc, 0x5b, 0xda, 0x82, 0x6b,
  0xdf, 0xfc, 0x41, 0x9e, 0x03, 0xc4, 0x35, 0xb6, 0x09, 0x12, 0x1e, 0x2d,
  0xa9, 0xbb,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0xb7, 0x22, 0x82, 0x05, 0x9f, 0x66, 0xcb, 0xe5, 0xea, 0xd9,
  0x49, 0x1d, 0x93, 0x98, 0x68, 0x98, 0x62, 0x3c, 0xaf, 0xe5, 0xe6, 0xf9,
  0x2b, 0xb5, 0x0e, 0x0a, 0xad, 0x15, 0x21, 0x79, 0xc4, 0x01, 0x75, 0x57,
  0x0e, 0xba, 0xc2, 0xb0, 0xde, 0xe4, 0x69, 0x86, 0x29, 0x17, 0x21, 0xaa,
  0x24, 0x20, 0xc8, 0x26, 0x5b, 0x10, 0xa1, 0xf9, 0x02, 0x82, 0x01, 0x00,
  0x48, 0x47, 0xf1, 0x69, 0xec, 0x42, 0x0a, 0x55, 0x5c, 0xd1, 0x74, 0x04,
  0x8b, 0xef, 0x06, 0x24, 0x88, 0x62, 0x65, 0x03, 0x60, 0xc5, 0x88, 0x00,
  0x05, 0x15, 0x03, 0xfa, 0x12, 0xe8, 0xa8, 0x9c, 0x96, 0xcc, 0x6e, 0x5e,
  0x86, 0x55, 0xe2, 0x35, 0x95, 0x3d, 0xc4, 0x7c, 0xf4, 0xbd, 0xbd, 0x32,
  0x6b, 0xcd, 0x5b, 0x1b, 0x98, 0xb9, 0x1a, 0xd9, 0x49, 0xed, 0xda, 0x5b,
  0x2d, 0x04, 0x0c, 0x10, 0xd7, 0xc4, 0x0c, 0xb7, 0xf1, 0xd2, 0x77, 0x9d,
  0x2b, 0x59, 0xfb, 0x7e, 0x3e, 0x6a, 0x4e, 0xc6, 0x54, 0x3c, 0x93, 0xdd,
  0xc4, 0x35, 0x43, 0xca, 0x96, 0x22, 0xeb, 0x7f, 0x23, 0xe0, 0x01, 0xed,
  0x62, 0xaa, 0xcb, 0x48, 0x50, 0x4e, 0x59, 0x0c, 0xff, 0x49, 0x87, 0xc6,
  0xb8, 0x48, 0x74, 0xde, 0x7f, 0xe0, 0x33, 0xc2, 0x2a, 0x30, 0x19, 0x3f,
  0x68, 0x40, 0xb8, 0xf9, 0xfe, 0x5e,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0, 0xc5, 0x9f, 0xab,
  0xbb, 0x1d, 0xdc, 0x18, 0x87, 0x22, 0x09, 0x65, 0xac, 0x4c, 0x6a, 0x0e,
  0x7a, 0x2f, 0x31, 0xc1, 0x9a, 0xf9, 0x56, 0xfa, 0x43, 0x9f, 0x78, 0x14,
  0x63, 0xb4, 0xf0, 0xb7, 0x2d, 0xa3, 0x02, 0x27, 0x9e, 0xa8, 0xe9, 0xef,
  0x54, 0xee, 0x23, 0x94, 0x97, 0x95, 0x22, 0x3f, 0xe2, 0x68, 0xf4, 0x5c,
  0xea, 0xdd, 0xb2, 0x18, 0x88, 0x0d, 0x66, 0xe1, 0x06, 0x9b, 0x6a, 0xe2,
  0x57, 0xcf, 0xd8, 0x37, 0x6d, 0x80, 0x42, 0x30, 0xfb, 0x4b, 0x19, 0xb1,
  0x23, 0xdd, 0x21, 0x87, 0x49, 0xb6, 0x9f, 0x4a, 0x64, 0xdb, 0xba, 0x71,
  0x67, 0xfc, 0x2d, 0x20, 0x36, 0x98, 0x37, 0x5a, 0xc5, 0xdc, 0x68, 0x85,
  0x93, 0xd4, 0xc5, 0x33, 0x98, 0x6c, 0x56, 0x21, 0x7b, 0x99, 0x72, 0xf9,
  0x96, 0x70, 0xd4, 0x0e, 0x0b, 0x21, 0x97, 0x4d, 0x15, 0x07, 0x41, 0x0f,
  0xb1, 0x4d, 0x12, 0x35, 0x1a, 0x21, 0xcb, 0x7c, 0xb9, 0x9c, 0xe5, 0x79,
  0x7d, 0x36, 0xca, 0xa7, 0x8f, 0xef, 0x3e, 0x31, 0xe8, 0x22, 0xdb, 0x25,
  0x03, 0xdd, 0xf1, 0xbc, 0x72, 0xd3, 0xf0, 0xf6, 0x96, 0x67, 0x7e, 0x06,
  0x71, 0xef, 0x3d, 0xd6, 0x0b, 0x30, 0x47, 0xb2, 0x11, 0x3d, 0xb8, 0x6b,
  0xad, 0x48, 0x30, 0xd2, 0x6b, 0x20, 0x59, 0x27, 0x57, 0x0b, 0xe9, 0x59,
  0x72, 0x41, 0x7c, 0x58, 0x50, 0x43, 0x25, 0x87, 0x26, 0xa6, 0xe2, 0xc6,
  0x53, 0x13, 0xb0, 0x9b, 0x58, 0x67, 0x16, 0x13, 0xdf, 0x18, 0x66, 0xc5,
  0xd1, 0x02, 0x82, 0x01, 0x00, 0x40, 0x29, 0x4f, 0x21, 0x8f, 0x19, 0xf8,
  0x97, 0x60, 0xc8, 0xa1, 0x06, 0x7b, 0x74, 0x43, 0xa2, 0x53, 0x54, 0x92,
  0x33, 0xe2, 0xb9, 0xdf, 0xb5, 0x88, 0x2e, 0xd7, 0xd1, 0x91, 0x21, 0x83,
  0xed, 0x74, 0xd6, 0x1c, 0x6b, 0xf2, 0x13, 0xeb, 0xd5, 0x5e, 0x2f, 0xc1,
  0xf4, 0xdd, 0x99, 0x63, 0xb6, 0xaf, 0x1a, 0x66, 0xee, 0x19, 0x3e, 0x98,
  0x00, 0x88, 0x1e, 0xc3, 0x0e, 0x0b, 0x55, 0x49, 0x32, 0x9d, 0x8a, 0x0d,
  0x45, 0x46, 0x11, 0x7b, 0x54, 0xf9, 0x89, 0x1d, 0xd3, 0xbc, 0xa8, 0xee,
  0xde, 0x5e, 0xb4, 0xd9, 0x3f, 0xf9, 0xff, 0x7c, 0x99, 0xb3, 0x45, 0xf0,
  0x78, 0x4f, 0x50, 0x90, 0xd0, 0xb7, 0xe4, 0x8c, 0x31, 0x69, 0xfa, 0xa2,
  0x6f, 0x02, 0x47, 0x52, 0x67, 0xf6, 0x6b, 0xb1, 0xe6, 0x0a, 0x3a, 0xa1,
  0x87, 0x88, 0x7a, 0x78, 0x63, 0x92, 0x7e, 0xa8, 0x4b, 0xa3, 0x98, 0x1e,
  0x91, 0x43, 0xa0, 0x35, 0x77, 0xe2, 0x50, 0xe9, 0x55, 0xb7, 0x2a, 0xfa,
  0x39, 0x34, 0x7f, 0x9c, 0x1f, 0x08, 0x24, 0x71, 0x89, 0x1b, 0xb5, 0x7f,
  0xcc, 0x7c, 0x2a, 0x94, 0x83, 0x18, 0xae, 0xc2, 0x1d, 0x2b, 0xd0, 0x5e,
  0x75, 0x3c, 0x7b, 0x63, 0xc8, 0x8f, 0xf0, 0xdc, 0x0d, 0xf4, 0xfa, 0xbb,
  0xc2, 0x1e, 0xa5, 0x67, 0x76, 0xe4, 0x2e, 0xd0, 0x1a, 0xd8, 0x5e, 0xc3,
  0x2e, 0x09, 0xdc, 0x48, 0x58, 0xb0, 0xdc, 0xaa, 0x7f, 0x8e, 0x86, 0x02,
  0x7b, 0xe9, 0x5b, 0x45, 0xda, 0xcd, 0x6c, 0xd5, 0xb4, 0x35, 0x49, 0x96,
  0x6d, 0xb3, 0x06, 0x83, 0x9d, 0x73, 0x89, 0xed, 0x7b, 0x5e, 0xe7, 0x19,
  0x64, 0x82, 0x4f, 0xf7, 0x40, 0xc4, 0xfa, 0x56, 0x20, 0x3b, 0x6b, 0x0e,
  0xec, 0x4e, 0x90, 0x80, 0x4f, 0xab, 0xc8, 0x36, 0x22, 0xc9, 0x97, 0x8a,
  0xba, 0x7f, 0x7c, 0x92, 0x86, 0xeb, 0x88, 0x14, 0x9f
};
static unsigned int test_client_4096_key_der_len = 2349;




/* Define thread prototypes.  */

static VOID    ntest_0_entry(ULONG thread_input);
static VOID    ntest_1_entry(ULONG thread_input);
extern VOID    _nx_ram_network_driver_1500(struct NX_IP_DRIVER_STRUCT *driver_req);


/* Define what the initial system looks like.  */


#define ERROR_COUNTER(status) _ERROR_COUNTER(status, __FILE__, __LINE__)

static VOID    _ERROR_COUNTER(UINT status, const char *file, int line)
{
	printf("Error (status = 0x%x) at %s:%d\n", status, file, line);
    error_counter++;
}

#ifdef CTEST
void test_application_define(void *first_unused_memory);
void test_application_define(void *first_unused_memory)
#else
VOID    nx_secure_tls_rsa_4096_test_application_define(void *first_unused_memory)
#endif
{
UINT     status;
CHAR    *pointer;


    error_counter = 0;


    /* Setup the working pointer.  */
    pointer =  (CHAR *) first_unused_memory;

    /* Create the server thread.  */
    tx_thread_create(&thread_0, "thread 0", ntest_0_entry, 0,
                     thread_0_stack, sizeof(thread_0_stack),
                     7, 7, TX_NO_TIME_SLICE, TX_AUTO_START);

    /* Create the client thread.  */
    tx_thread_create(&thread_1, "thread 1", ntest_1_entry, 0,
                     thread_1_stack, sizeof(thread_1_stack),
                     8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);

    /* Initialize the NetX system.  */
    nx_system_initialize();

    /* Create a packet pool.  */
    status =  nx_packet_pool_create(&pool_0, "NetX Main Packet Pool", PACKET_SIZE,
                                    pool_0_memory, PACKET_POOL_SIZE);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Create an IP instance.  */
    status = nx_ip_create(&ip_0, "NetX IP Instance 0", IP_ADDRESS(1, 2, 3, 4), 0xFFFFFF00UL,
                          &pool_0, _nx_ram_network_driver_1500,
                          ip_0_stack, sizeof(ip_0_stack), 1);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Enable ARP and supply ARP cache memory for IP Instance 0.  */
    status =  nx_arp_enable(&ip_0, (VOID *)arp_cache, sizeof(arp_cache));
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Enable TCP traffic.  */
    status =  nx_tcp_enable(&ip_0);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    nx_secure_tls_initialize();
}

static VOID client_tls_setup(NX_SECURE_TLS_SESSION *tls_session_ptr)
{
UINT status;

    status = nx_secure_tls_session_create(tls_session_ptr,
                                          &nx_crypto_tls_ciphers,
                                          client_metadata,
                                          sizeof(client_metadata));
    if (status)
    {
        ERROR_COUNTER(status);
    }

    memset(&client_remote_cert, 0, sizeof(client_remote_cert));
    status = nx_secure_tls_remote_certificate_allocate(tls_session_ptr,
                                                       &client_remote_cert,
                                                       client_cert_buffer,
                                                       sizeof(client_cert_buffer));
    if (status)
    {
        ERROR_COUNTER(status);
    }

    memset(&client_local_certificate, 0, sizeof(client_local_certificate));
    status = nx_secure_x509_certificate_initialize(&client_local_certificate,
                                                   test_client_4096_der, test_client_4096_der_len,
                                                   NX_NULL, 0, test_client_4096_key_der,
                                                   test_client_4096_key_der_len,
                                                   NX_SECURE_X509_KEY_TYPE_RSA_PKCS1_DER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_local_certificate_add(tls_session_ptr,
                                                 &server_local_certificate);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_x509_certificate_initialize(&client_trusted_ca, CA4096_der, CA4096_der_len,
                                                   NX_NULL, 0, NULL, 0,
                                                   NX_SECURE_X509_KEY_TYPE_NONE);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_trusted_certificate_add(tls_session_ptr,
                                                   &client_trusted_ca);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_session_packet_buffer_set(tls_session_ptr, tls_packet_buffer[0],
                                                     sizeof(tls_packet_buffer[0]));
    if (status)
    {
        ERROR_COUNTER(status);
    }
}

static VOID server_tls_setup(NX_SECURE_TLS_SESSION *tls_session_ptr)
{
UINT status;

    status = nx_secure_tls_session_create(tls_session_ptr,
                                          &nx_crypto_tls_ciphers,
                                          server_metadata,
                                          sizeof(server_metadata));
    if (status)
    {
        ERROR_COUNTER(status);
    }

    memset(&server_remote_cert, 0, sizeof(server_remote_cert));
    status = nx_secure_tls_remote_certificate_allocate(tls_session_ptr,
                                                       &server_remote_cert,
                                                       server_cert_buffer,
                                                       sizeof(server_cert_buffer));
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_session_client_verify_enable(tls_session_ptr);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    memset(&server_local_certificate, 0, sizeof(server_local_certificate));
    status = nx_secure_x509_certificate_initialize(&server_local_certificate,
                                                   test_server_4096_der, test_server_4096_der_len,
                                                   NX_NULL, 0, test_server_4096_key_der,
                                                   test_server_4096_key_der_len,
                                                   NX_SECURE_X509_KEY_TYPE_RSA_PKCS1_DER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_local_certificate_add(tls_session_ptr,
                                                 &server_local_certificate);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_x509_certificate_initialize(&server_trusted_ca, CA4096_der, CA4096_der_len,
                                                   NX_NULL, 0, NULL, 0,
                                                   NX_SECURE_X509_KEY_TYPE_NONE);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_trusted_certificate_add(tls_session_ptr,
                                                   &server_trusted_ca);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_session_packet_buffer_set(tls_session_ptr, tls_packet_buffer[1],
                                                     sizeof(tls_packet_buffer[1]));
    if (status)
    {
        ERROR_COUNTER(status);
    }
}

static void ntest_0_entry(ULONG thread_input)
{
UINT status;
ULONG response_length;
NX_PACKET *packet_ptr;

    /* Print out test information banner.  */
    printf("NetX Secure Test:   TLS 4096-bit RSA Test..............................");

    /* Create TCP socket. */
    status = nx_tcp_socket_create(&ip_0, &server_socket_0, "Server socket", NX_IP_NORMAL,
                                  NX_DONT_FRAGMENT, NX_IP_TIME_TO_LIVE, 8192, NX_NULL, NX_NULL);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_tcp_server_socket_listen(&ip_0, SERVER_PORT, &server_socket_0, 5, NX_NULL);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    server_tls_setup(&tls_server_session_0);

    status = nx_tcp_server_socket_accept(&server_socket_0, NX_WAIT_FOREVER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Start TLS session. */
    status = nx_secure_tls_session_start(&tls_server_session_0, &server_socket_0,
                                          NX_WAIT_FOREVER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_secure_tls_session_receive(&tls_server_session_0, &packet_ptr, NX_WAIT_FOREVER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    nx_packet_data_retrieve(packet_ptr, response_buffer, &response_length);
    nx_packet_release(packet_ptr);
    if ((response_length != sizeof(request_buffer)) ||
        memcmp(request_buffer, response_buffer, response_length))
    {
        ERROR_COUNTER(status);
    }

    nx_secure_tls_session_end(&tls_server_session_0, NX_NO_WAIT);
    nx_secure_tls_session_delete(&tls_server_session_0);

    nx_tcp_socket_disconnect(&server_socket_0, NX_NO_WAIT);
    nx_tcp_server_socket_unaccept(&server_socket_0);
    nx_tcp_server_socket_relisten(&ip_0, SERVER_PORT, &server_socket_0);

    if (error_counter)
    {
        printf("ERROR!\n");
        test_control_return(1);
    }
    else
    {
        printf("SUCCESS!\n");
        test_control_return(0);
    }
}

static void ntest_1_entry(ULONG thread_input)
{
UINT i;
UINT status;
NX_PACKET *packet_ptr;
NXD_ADDRESS server_address;

    server_address.nxd_ip_version = NX_IP_VERSION_V4;
    server_address.nxd_ip_address.v4 = IP_ADDRESS(127, 0, 0, 1);

    /* Create TCP socket. */
    status = nx_tcp_socket_create(&ip_0, &client_socket_0, "Client socket", NX_IP_NORMAL,
                                  NX_DONT_FRAGMENT, NX_IP_TIME_TO_LIVE, 8192, NX_NULL, NX_NULL);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    status = nx_tcp_client_socket_bind(&client_socket_0, NX_ANY_PORT, NX_NO_WAIT);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    for (i = 0; i < sizeof(request_buffer); i++)
    {
        request_buffer[i] = i;
        response_buffer[i] = 0;
    }

    client_tls_setup(&tls_client_session_0);

    status =  nxd_tcp_client_socket_connect(&client_socket_0, &server_address, SERVER_PORT,
                                            NX_WAIT_FOREVER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Start TLS session. */
    status = nx_secure_tls_session_start(&tls_client_session_0, &client_socket_0,
                                          NX_WAIT_FOREVER);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Prepare packet to send. */
    status = nx_packet_allocate(&pool_0, &packet_ptr, NX_TCP_PACKET, NX_NO_WAIT);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    packet_ptr -> nx_packet_prepend_ptr += NX_SECURE_TLS_RECORD_HEADER_SIZE;
    packet_ptr -> nx_packet_append_ptr = packet_ptr -> nx_packet_prepend_ptr;

    status = nx_packet_data_append(packet_ptr, request_buffer, sizeof(request_buffer),
                                   &pool_0, NX_NO_WAIT);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    /* Send the packet. */
    status = nx_secure_tls_session_send(&tls_client_session_0, packet_ptr, NX_NO_WAIT);
    if (status)
    {
        ERROR_COUNTER(status);
    }

    nx_secure_tls_session_end(&tls_client_session_0, NX_NO_WAIT);
    nx_secure_tls_session_delete(&tls_client_session_0);

    nx_tcp_socket_disconnect(&client_socket_0, NX_NO_WAIT);
}
#else
#ifdef CTEST
void test_application_define(void *first_unused_memory);
void test_application_define(void *first_unused_memory)
#else
VOID    nx_secure_tls_rsa_4096_test_application_define(void *first_unused_memory)
#endif
{

    /* Print out test information banner.  */
    printf("NetX Secure Test:   TLS 4096-bit RSA Test..............................N/A\n");
    test_control_return(3);
}
#endif
